<script>
// 验证码切换
function verify_image_refresh(obj) {
    obj.attr('src','?app=common&mod=verify&rand='+Math.random());
}
$(function(){
    var verify_image = $('#verify');
    verify_image.click(function(){
        verify_image_refresh($(this));
    });
    verify_image.click();

    $('#form').submit(function(){
        $.post('?app=portal&mod=modi_password',$(this).serialize(),function(data){
            if (data.state <= 0)
            {
                if (data.state == -1)
                {
                    verify_image.click();
                    $('input[name=verify]').focus().val('');
                }
                alert(data.message);
                return false;
            }
            dialogMessage(data.message);
        },'json');
        return false;
    });
});
</script>
<div class="edit_tab tab">
<div class="bg1">
<div class="bg2">
      <span class="span_now">修改密码</span>
</div>
</div>
</div>
<div class="edit_div">
<div class="line_1"></div>
<form id="form">
    <div class="form_div1">
        <span class="span1">当前密码：</span>
        <span><input type="password" name="password" /></span>
    </div>
    <div class="form_div1">
        <span class="span1">新密码：</span>
        <span><input type="password" name="new_password" /></span>
    </div>
    <div class="form_div1">
        <span class="span1">确认密码：</span>
        <span><input type="password" name="new_password_confirm" /></span>
    </div>
    <div class="form_div1">
        <span class="span1">验证码：</span>
        <span><img src="" id='verify' verify align="middle"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" maxlength="4" style="width:40px;height:23px;" name="verify" align="middle"/></span>
    </div>
<div class="form_div1">
       <span class="span1"></span>
       <span><input name="" type="submit" class="btn1" value="确定" /><input name="" type="reset" class="btn1" value="重置" /></span>
</div>
</form>
</div>